﻿<%@ Page Title="Historial de Contáctenos" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ContactUsLog.aspx.cs" Inherits="ContactUsLog" %>

<%@ Register Assembly="ESF.Web" Namespace="ESF.Web.ServerControls" TagPrefix="esf" %>

<asp:Content ID="cntEncabezado" ContentPlaceHolderID="cntEncabezado" runat="server">
	<style type="text/css">
		.lblCountResumen { display:block;float:left;clear:left; width:100%; text-align:center; margin-top:6px; margin-bottom:6px; padding: 6px 10px 6px 10px; border:solid 1px #b2b2b2; font-style:italic; }
		.divSendReceiveData { display:block;float:left;clear:left; width:100%; height:100px; margin-bottom:6px; }
	</style>
</asp:Content>

<asp:Content ID="cntContenido" ContentPlaceHolderID="cntContenido" Runat="Server">

    <asp:Panel ID="pnlForm" CssClass="divForm" runat="server" DefaultButton="btnBrowse">
		<div class="header">
			<div class="title">
				<asp:Label ID="lblTitle" runat="server"></asp:Label>
			</div>
			<div class="subtitle">
				Observe aqui el listado de solicitudes (contáctenos) realizadas por usted.<br />
                Recuerde que sus solicitudes se manejan con una sola respuesta.
			</div>
		</div>

        <asp:UpdatePanel ID="updFields" runat="server" UpdateMode="Conditional">
		    <ContentTemplate>			
				<div class="divField">
					<div class="label">Email de Contacto
                    </div>
                    <div class="field">
                        <asp:Label ID="lblSenderEmail" runat="server"></asp:Label>
                    </div>
                </div>
                <div class="divField">
					<div class="label">Categoria
                    </div>
                    <div class="field">
                        <asp:DropDownList ID="ddlContactUsType" runat="server"></asp:DropDownList>
                    </div>
                </div>
                <div class="divField">
					<div class="label">Atendido
                    </div>
                    <div class="field">
                        <asp:DropDownList ID="ddlWithResponse" runat="server"></asp:DropDownList>
                    </div>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
		<div class="divOperations">
			<asp:UpdatePanel ID="updOperations" runat="server" UpdateMode="Conditional">
				<ContentTemplate>
					<asp:Button ID="btnBrowse" runat="server" Text="Consultar" CausesValidation="true"
						OnClick="btnBrowse_Click" />				
				</ContentTemplate>
			</asp:UpdatePanel>
		</div>
        <asp:UpdatePanel ID="uppResults" runat="server" UpdateMode="Conditional">
			<Triggers>
				<asp:AsyncPostBackTrigger ControlID="btnBrowse" />
				<asp:AsyncPostBackTrigger ControlID="dpggrvResults" />
			</Triggers>
			<ContentTemplate>
				<esf:DataPagging ID="dpggrvResults" PageSize="20" CssClass="pager" runat="server" Visible="false"
					OnOnPageChanged="dpggrvResults_OnPageChanged" ReplicatePaggingControlIDs="dpggrvResults_footer" />
				<asp:GridView EnableSortingAndPagingCallbacks="false" AllowPaging="false" AllowSorting="false" ID="grvResults" runat="server" AutoGenerateColumns="false" OnRowDataBound="grvResults_RowDataBound">
					<Columns>
						<asp:TemplateField HeaderText="Mensaje" ItemStyle-Width="50%">
							<ItemTemplate>
								<div class="divSendReceiveData">
									<asp:Label ID="lblContactUsType" runat="server"></asp:Label>
									<asp:Label ID="lblUserAlias" runat="server"></asp:Label>
									<asp:Label ID="lblCalUserFullName" runat="server"></asp:Label>
									<b>Email: </b>
									<asp:Label ID="lblSenderEmail" runat="server"></asp:Label><br />
									<asp:Label ID="lblTitle" runat="server"></asp:Label>
									<asp:HiddenField ID="hidTitle" runat="server" />
									<b>Fecha y Hora: </b>
									<asp:Label ID="lblCreationDateTime" runat="server"></asp:Label><br />
									<b>Comentario: </b><br />
								</div>
								<asp:TextBox ID="txtComments" ReadOnly="true" runat="server" Width="98%" TextMode="MultiLine" Rows="7"></asp:TextBox>
							</ItemTemplate>
						</asp:TemplateField>
						<asp:TemplateField HeaderText="Respuesta" ItemStyle-Width="50%">
							<ItemTemplate>
								<div class="divSendReceiveData">
									<asp:Label ID="lblResponseUserAlias" runat="server"></asp:Label>
									<asp:Label ID="lblResponseCalUserFullName" runat="server"></asp:Label>
									<asp:Label ID="lblResponseDateTime" runat="server"></asp:Label><br />
									<b>Respuesta: </b>
								</div>
								<asp:TextBox ID="txtResponse" ReadOnly="true" runat="server" TextMode="MultiLine" Rows="7" MaxLength="3000"
									Width="98%"></asp:TextBox>
								
							</ItemTemplate>
						</asp:TemplateField>
					</Columns>
				</asp:GridView>
				<esf:DataPagging ID="dpggrvResults_footer" MasterDataPaggingControlID="dpggrvResults" CssClass="pager" runat="server" />
			</ContentTemplate>
		</asp:UpdatePanel>
    </asp:Panel>

</asp:Content>
